#include <iostream>   
#include <limits>
#include <stddef.h>
#include <vector>
#include <math.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <float.h>

class Point
{
public:
	double x, y;
	Point();
	Point(double x_, double y_);
};

Point::Point()
{}

Point::Point(double x_, double y_)
{
	x = x_;
	y = y_;
}

std::ostream& operator<<(std::ostream &os, const Point &p)
{
    os << "(" << p.x << "; " << p.y << ")";
    return os;
}

static const double EPS = std::numeric_limits<double>::epsilon();

int simple_turn(const Point& a, const Point& b, const Point& c) {
        double turn = (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
        double eps = 4 * EPS * (abs((b.x - a.x) * (c.y - a.y)) + abs((b.y - a.y) * (c.x - a.x)));
        if (turn > eps)
            return 1;
		if (turn < -eps)
			return -1;
        return 0;
}
double sum(double a, double b, double &r)
{
	double res = a + b;
	double bv = res - a;
	double av = res - bv;
	r = (a - av) + (b - bv);
	return res;
}
    
void split(double a, double &ah, double &al)
{
    int s = std::numeric_limits<double>::digits - std::numeric_limits<double>::digits / 2;
    double c = ((1LL << s) + 1LL) * a;
    ah = c - (c - a);
    al = a - ah;
}

double mul(double a, double b, double &y)
{
    double x = a * b;
    double ah, al, bh, bl;
    split(a, ah, al);
    split(b, bh, bl);
    y = (al * bl) - (((x - (ah * bh)) - (al * bh)) - (bl * ah));
    return x;
}

    
template <int N>
void grow_expansion(double *e, double b, double *h)
{
    double q = b;
    for (int i = 0; i < N; i++)
    {
        q = sum(e[i], q, h[i]);
    }
    h[N] = q;
}

template <int N1, int N2>
void expansion_sum(double *e, double *f)
{
    for(int i = 0; i < N2; i++)
    {
        grow_expansion<N1>(e + i, f[i], e + i);
    }
}

int adaptive_turn(const Point &a, const Point &b, const Point &c)
{
    double p[12];
    
    p[0] = mul(b.x, c.y, p[1]);
    p[2] = mul(-b.x, a.y, p[3]);
    p[4] = mul(-a.x, c.y, p[5]);
    p[6] = mul(-b.y, c.x, p[7]);
    p[8] = mul(b.y, a.x, p[9]);
    p[10] = mul(a.y, c.x, p[11]);

    expansion_sum<2, 2>(p, p + 2);
    expansion_sum<2, 2>(p + 4, p + 6);
    expansion_sum<2, 2>(p + 8, p + 10);
    expansion_sum<4, 4>(p, p + 4);
    expansion_sum<8, 4>(p, p + 8);
    
    for (int i = 11; i >= 0; i--)
    {
        if (p[i] > 0)
            return 1;
        if (p[i] < 0)
            return -1;
    }
    return 0;
}

int full_turn(const Point& a, const Point& b, const Point& c) {
    int simple = simple_turn(a, b, c);
	if (simple != 0) { 
		return simple;
    } else {
		return adaptive_turn(a, b, c);
    }
}

int main()
{
	using std::cin;
	using std::cout;

	int n;
	double x, y;
	cin >> n;
	std::vector<Point> points(n);
	
	for (int i = 0; i < n; i++)
	{
		cin >> x >> y;
		points[i] = Point(x, y);
	}
	
	int m;
	cin >> m;
	for (int i = 0; i < m; i++)
	{
		cin >> x >> y;
		Point p(x, y);

		bool ok = true;
		for (int j = 0; j < n; j++)
		{
			if (full_turn(points[j], p, points[(j + 1) % n]) > 0) 
			{
				cout << "NO\n";
				ok = false;
				break;
			}
		}
		if (ok)
			cout << "YES\n";
	}
}